<template>
    <div>
        <h3>{{detail.title}}</h3>
    </div>
</template>
<script>
import { mapState } from 'vuex';
export default {
    computed:{
        ...mapState(['detail'])
    },
    created(){
        console.log(this.$route.params.id)
        this.$store.dispatch('setDetail',this.$route.params.id);
    }
}
</script>